<div class="page-content">
	<!-- BEGIN PAGE HEADER-->
	<div class="row">
		<div class="col-md-12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
			Cart
			</h3>
			<ul class="page-breadcrumb breadcrumb">
				<li>
					<i class="fa fa-home"></i>
					<a href="<?php echo $this->Admin->admin_url() ?>">
						Home
					</a>
					<i class="fa fa-angle-right"></i>
				</li>
				<li>
					<a href="javascript:void(0)">
						Cart
					</a>
				</li>

			</ul>
			<!-- END PAGE TITLE & BREADCRUMB-->
		</div>
	</div>
	<!-- END PAGE HEADER-->
	<!-- BEGIN PAGE CONTENT-->
	<div class="row">
		<div class="col-md-12">
			<!-- BEGIN EXAMPLE TABLE PORTLET-->
			<div class="portlet box light-grey">
				<div class="portlet-title">
					<div class="caption">
						<i class="fa fa-globe"></i>Managed table
					</div>
				</div>
				<div class="portlet-body">
                    <?php echo $this->Session->flash(); ?>
					<table class="table table-striped table-bordered table-hover" id="table_cart">
					<thead>
					<tr>
						<th width="5%" class="align_center">
							nu
						</th>
						<th width="7%">
							 id
						</th>
						<th width="20%">
							 User name
						</th>
						<th width="5%" class="align_center">
							 Number
						</th>
						<th width="10%">
							 Price
						</th>
						<th width="10%">
							 Discount
						</th>
                        <th width="15%" class="align_center">
							 Status
						</th>
                        <th width="10%">
							 Date
						</th>
                        <th width="15%" class="align_center">
							 Actions
						</th>
					</tr>
					</thead>
					<tbody>
                        <?php
                            $i = 1;
                            foreach($cart_list as $cart)
                            {
                                $color = array('yellow', 'blue', 'green', 'red');
                        ?>
    					<tr class="odd gradeX">
    						<td class="align_center">
    							<?php echo $i++ ?>
    						</td>
    						<td><?php echo $cart['cart']['cart_id'] ?></td>
                            <td><?php echo $cart['users']['name'] ?></td>
                            <td class="align_center"><?php echo $cart['custom']['number_product'] ?></td>
                            <td><?php echo number_format($cart['custom']['sum_price'],0,',','.') ?></td>
                            <td><?php echo number_format($cart['custom']['sum_discount'],0,',','.') ?></td>
                            <td>
                                <div class="div_status_cart">
                                    <a cart_id = "<?php echo $cart['cart']['cart_id'] ?>" status = "<?php echo $cart['cart']['status'] ?>" change_status_cart="change_status_cart" href="javascript:void(0)" class="btn <?php echo $color[$cart['cart']['status']] ?>">
                                        <?php echo $cart['cart_status']['title'] ?>
                                    </a>
                                </div>
                            </td>
                            <td><?php echo $cart['cart']['date_added'] ?></td>
    						<td class="align_center">
    							<div class=" btn-group-xs">
                                    <a class="btn green" href="<?php echo $this->Admin->admin_url() ?>cart/detail/<?php echo $cart['cart']['cart_id'] ?>">Detail</a>
                                    <a href="javascript:void(0)" class="btn red config delete_cart" cart_id="<?php echo $cart['cart']['cart_id'] ?>">Delete</a>
								</div>
    						</td>
    					</tr>
                        <?php
                            }
                        ?>
					</tbody>
					</table>
				</div>
			</div>
			<!-- END EXAMPLE TABLE PORTLET-->
		</div>
	</div>
	<!-- END PAGE CONTENT-->
</div>